package com.baibei.model;

import android.os.Parcel;
import android.os.Parcelable;

import com.google.gson.annotations.SerializedName;

import java.io.DataInput;
import java.io.Serializable;
import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * Created by tang on 2018/8/22.
 */

public class FollowMsgInfo implements Serializable ,DateInfo ,Parcelable{
    private String dtime;
    private String message;
    private String time;
    private String state;
    private String type;
    private String followerId;
    private String userPic;

    public FollowMsgInfo(String dtime, String message, String time, String state, String type, String followerId, String userPic) {
        this.dtime = dtime;
        this.message = message;
        this.time = time;
        this.state = state;
        this.type = type;
        this.followerId = followerId;
        this.userPic = userPic;
    }

    protected FollowMsgInfo(Parcel in) {
        dtime = in.readString();
        message = in.readString();
        time = in.readString();
        state = in.readString();
        type = in.readString();
        followerId = in.readString();
        userPic = in.readString();
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(dtime);
        dest.writeString(message);
        dest.writeString(time);
        dest.writeString(state);
        dest.writeString(type);
        dest.writeString(followerId);
        dest.writeString(userPic);
    }

    @Override
    public int describeContents() {
        return 0;
    }

    public static final Creator<FollowMsgInfo> CREATOR = new Creator<FollowMsgInfo>() {
        @Override
        public FollowMsgInfo createFromParcel(Parcel in) {
            return new FollowMsgInfo(in);
        }

        @Override
        public FollowMsgInfo[] newArray(int size) {
            return new FollowMsgInfo[size];
        }
    };

    public String getDtime() {
        return dtime;
    }

    public void setDtime(String dtime) {
        this.dtime = dtime;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public String getTime() {
        return time;
    }

    public void setTime(String time) {
        this.time = time;
    }

    public String getState() {
        return state;
    }

    public void setState(String state) {
        this.state = state;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getFollowerId() {
        return followerId;
    }

    public void setFollowerId(String followerId) {
        this.followerId = followerId;
    }

    public String getUserPic() {
        return userPic;
    }

    public void setUserPic(String userPic) {
        this.userPic = userPic;
    }

    @Override
    public String toString() {
        return "FollowMsgInfo{" +
                "dtime='" + dtime + '\'' +
                ", message='" + message + '\'' +
                ", time='" + time + '\'' +
                ", state='" + state + '\'' +
                ", type='" + type + '\'' +
                ", followerId='" + followerId + '\'' +
                ", userPic='" + userPic + '\'' +
                '}';
    }

    @Override
    public long getDate() {
        return Long.parseLong(dtime);
    }
}
